Integrand size = 33, antiderivative size = 95 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx=\frac {2 \left (A b^2+a^2 C\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 \sqrt {a-b} \sqrt {a+b} d}-\frac {A b \text {arctanh}(\sin (c+d x))}{a^2 d}+\frac {A \tan (c+d x)}{a d} \]
-A*b*arctanh(sin(d*x+c))/a^2/d+2*(A*b^2+C*a^2)*arctan((a-b)^(1/2)*tan(1/2* d*x+1/2*c)/(a+b)^(1/2))/a^2/d/(a-b)^(1/2)/(a+b)^(1/2)+A*tan(d*x+c)/a/d
Result contains complex when optimal does not.
Time = 3.03 (sec) , antiderivative size = 306, normalized size of antiderivative = 3.22 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx=\frac {2 \cos ^2(c+d x) \left (C+A \sec ^2(c+d x)\right ) \left (A b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-A b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-\frac {2 i \left (A b^2+a^2 C\right ) \arctan \left (\frac {(i \cos (c)+\sin (c)) \left (b \sin (c)+(-a+b \cos (c)) \tan \left (\frac {d x}{2}\right )\right )}{\sqrt {-\left (\left (a^2-b^2\right ) (\cos (c)-i \sin (c))^2\right )}}\right ) (\cos (c)-i \sin (c))}{\sqrt {\left (-a^2+b^2\right ) (\cos (c)-i \sin (c))^2}}+\frac {a A \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {a A \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{a^2 d (2 A+C+C \cos (2 (c+d x)))} \]
(2*Cos[c + d*x]^2*(C + A*Sec[c + d*x]^2)*(A*b*Log[Cos[(c + d*x)/2] - Sin[( c + d*x)/2]] - A*b*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - ((2*I)*(A*b^ 2 + a^2*C)*ArcTan[((I*Cos[c] + Sin[c])*(b*Sin[c] + (-a + b*Cos[c])*Tan[(d* x)/2]))/Sqrt[-((a^2 - b^2)*(Cos[c] - I*Sin[c])^2)]]*(Cos[c] - I*Sin[c]))/S qrt[(-a^2 + b^2)*(Cos[c] - I*Sin[c])^2] + (a*A*Sin[(d*x)/2])/((Cos[c/2] - Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + (a*A*Sin[(d*x)/2])/((Co s[c/2] + Sin[c/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))))/(a^2*d*(2*A + C + C*Cos[2*(c + d*x)]))
Time = 0.57 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.05, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3042, 3535, 25, 3042, 3480, 3042, 3138, 218, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 3535 |
\(\displaystyle \frac {\int -\frac {(A b-a C \cos (c+d x)) \sec (c+d x)}{a+b \cos (c+d x)}dx}{a}+\frac {A \tan (c+d x)}{a d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {A \tan (c+d x)}{a d}-\frac {\int \frac {(A b-a C \cos (c+d x)) \sec (c+d x)}{a+b \cos (c+d x)}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \tan (c+d x)}{a d}-\frac {\int \frac {A b-a C \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )}dx}{a}\) |
\(\Big \downarrow \) 3480 |
\(\displaystyle \frac {A \tan (c+d x)}{a d}-\frac {\frac {A b \int \sec (c+d x)dx}{a}-\frac {\left (a^2 C+A b^2\right ) \int \frac {1}{a+b \cos (c+d x)}dx}{a}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \tan (c+d x)}{a d}-\frac {\frac {A b \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a}-\frac {\left (a^2 C+A b^2\right ) \int \frac {1}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a}}{a}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {A \tan (c+d x)}{a d}-\frac {\frac {A b \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a}-\frac {2 \left (a^2 C+A b^2\right ) \int \frac {1}{(a-b) \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}d\tan \left (\frac {1}{2} (c+d x)\right )}{a d}}{a}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {A \tan (c+d x)}{a d}-\frac {\frac {A b \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a}-\frac {2 \left (a^2 C+A b^2\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}}{a}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {A \tan (c+d x)}{a d}-\frac {\frac {A b \text {arctanh}(\sin (c+d x))}{a d}-\frac {2 \left (a^2 C+A b^2\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}}{a}\) |
-(((-2*(A*b^2 + a^2*C)*ArcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]]) /(a*Sqrt[a - b]*Sqrt[a + b]*d) + (A*b*ArcTanh[Sin[c + d*x]])/(a*d))/a) + ( A*Tan[c + d*x])/(a*d)
3.6.67.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_ .)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(A*b - a*B)/(b*c - a*d) Int[1/(a + b*Sin[e + f*x]), x], x] + Simp[(B*c - A*d)/ (b*c - a*d) Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f , A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 + a^2*C))*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*((c + d*S in[e + f*x])^(n + 1)/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2))), x] + Simp[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin [e + f*x])^n*Simp[a*(m + 1)*(b*c - a*d)*(A + C) + d*(A*b^2 + a^2*C)*(m + n + 2) - (c*(A*b^2 + a^2*C) + b*(m + 1)*(b*c - a*d)*(A + C))*Sin[e + f*x] - d *(A*b^2 + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] && !IntegerQ[m]) || EqQ[a, 0])))
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 2.10 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.42
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (A \,b^{2}+a^{2} C \right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{2} \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {A}{a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2}}-\frac {A}{a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}}{d}\) | \(135\) |
default | \(\frac {\frac {2 \left (A \,b^{2}+a^{2} C \right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{2} \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {A}{a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2}}-\frac {A}{a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}}{d}\) | \(135\) |
risch | \(\frac {2 i A}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) A \,b^{2}}{\sqrt {-a^{2}+b^{2}}\, d \,a^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) C}{\sqrt {-a^{2}+b^{2}}\, d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) A \,b^{2}}{\sqrt {-a^{2}+b^{2}}\, d \,a^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) C}{\sqrt {-a^{2}+b^{2}}\, d}+\frac {A b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{2} d}-\frac {A b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{2} d}\) | \(360\) |
1/d*(2*(A*b^2+C*a^2)/a^2/((a-b)*(a+b))^(1/2)*arctan((a-b)*tan(1/2*d*x+1/2* c)/((a-b)*(a+b))^(1/2))-A/a/(tan(1/2*d*x+1/2*c)+1)-A*b/a^2*ln(tan(1/2*d*x+ 1/2*c)+1)-A/a/(tan(1/2*d*x+1/2*c)-1)+A*b/a^2*ln(tan(1/2*d*x+1/2*c)-1))
Time = 0.68 (sec) , antiderivative size = 412, normalized size of antiderivative = 4.34 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx=\left [-\frac {{\left (C a^{2} + A b^{2}\right )} \sqrt {-a^{2} + b^{2}} \cos \left (d x + c\right ) \log \left (\frac {2 \, a b \cos \left (d x + c\right ) + {\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \left (d x + c\right ) + b\right )} \sin \left (d x + c\right ) - a^{2} + 2 \, b^{2}}{b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + a^{2}}\right ) + {\left (A a^{2} b - A b^{3}\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A a^{2} b - A b^{3}\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (A a^{3} - A a b^{2}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{4} - a^{2} b^{2}\right )} d \cos \left (d x + c\right )}, \frac {2 \, {\left (C a^{2} + A b^{2}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right ) - {\left (A a^{2} b - A b^{3}\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (A a^{2} b - A b^{3}\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a^{3} - A a b^{2}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{4} - a^{2} b^{2}\right )} d \cos \left (d x + c\right )}\right ] \]
[-1/2*((C*a^2 + A*b^2)*sqrt(-a^2 + b^2)*cos(d*x + c)*log((2*a*b*cos(d*x + c) + (2*a^2 - b^2)*cos(d*x + c)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b )*sin(d*x + c) - a^2 + 2*b^2)/(b^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + a ^2)) + (A*a^2*b - A*b^3)*cos(d*x + c)*log(sin(d*x + c) + 1) - (A*a^2*b - A *b^3)*cos(d*x + c)*log(-sin(d*x + c) + 1) - 2*(A*a^3 - A*a*b^2)*sin(d*x + c))/((a^4 - a^2*b^2)*d*cos(d*x + c)), 1/2*(2*(C*a^2 + A*b^2)*sqrt(a^2 - b^ 2)*arctan(-(a*cos(d*x + c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c)))*cos(d*x + c) - (A*a^2*b - A*b^3)*cos(d*x + c)*log(sin(d*x + c) + 1) + (A*a^2*b - A*b ^3)*cos(d*x + c)*log(-sin(d*x + c) + 1) + 2*(A*a^3 - A*a*b^2)*sin(d*x + c) )/((a^4 - a^2*b^2)*d*cos(d*x + c))]
\[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx=\int \frac {\left (A + C \cos ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{a + b \cos {\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.31 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.73 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx=-\frac {\frac {A b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {A b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a} + \frac {2 \, {\left (C a^{2} + A b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{\sqrt {a^{2} - b^{2}} a^{2}}}{d} \]
-(A*b*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - A*b*log(abs(tan(1/2*d*x + 1 /2*c) - 1))/a^2 + 2*A*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*a ) + 2*(C*a^2 + A*b^2)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)) )/(sqrt(a^2 - b^2)*a^2))/d
Time = 3.47 (sec) , antiderivative size = 1328, normalized size of antiderivative = 13.98 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx=\text {Too large to display} \]
(A*a*tan(c + d*x))/(d*(a^2 - b^2)) - (C*atan(((2*A^2*b^5*sin(c/2 + (d*x)/2 )*(b^2 - a^2)^(3/2) - 2*A^2*b^7*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) + C^2 *a^7*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) + 2*C^2*a^4*b*sin(c/2 + (d*x)/2) *(b^2 - a^2)^(3/2) + C^2*a^6*b*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) + 3*A^ 2*a^2*b^5*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) - A^2*a^3*b^4*sin(c/2 + (d* x)/2)*(b^2 - a^2)^(1/2) - A^2*a^4*b^3*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) + A^2*a^5*b^2*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) - C^2*a^4*b^3*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) - C^2*a^5*b^2*sin(c/2 + (d*x)/2)*(b^2 - a^2)^ (1/2) + 4*A*C*a^2*b^3*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(3/2) - 2*A*C*a^2*b^5 *sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) - 2*A*C*a^3*b^4*sin(c/2 + (d*x)/2)*( b^2 - a^2)^(1/2) + 2*A*C*a^4*b^3*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) + 2* A*C*a^5*b^2*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2))*1i)/(cos(c/2 + (d*x)/2)* (a*b^2 - a^3)*(C^2*a^5 - A^2*a*b^4 + A^2*a^3*b^2 - C^2*a^3*b^2 - 2*A*C*a*b ^4 + 2*A*C*a^3*b^2)))*(-(a + b)*(a - b))^(1/2)*2i)/(d*(a^2 - b^2)) - (2*A* b*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(d*(a^2 - b^2)) + (2*A*b^3 *atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(a^2*d*(a^2 - b^2)) - (A*b^ 2*tan(c + d*x))/(a*d*(a^2 - b^2)) - (A*b^2*atan(((2*A^2*b^5*sin(c/2 + (d*x )/2)*(b^2 - a^2)^(3/2) - 2*A^2*b^7*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) + C^2*a^7*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) + 2*C^2*a^4*b*sin(c/2 + (d*x) /2)*(b^2 - a^2)^(3/2) + C^2*a^6*b*sin(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2) ...